package com.nick.singleton;

/**
 * Created by xiaobao on 2017/7/18.
 * This is the most simple singleton code, it is lazy loading style but not thread safe.
 */
public class Singleton1 {
    private static Singleton1 singleton;

    private Singleton1() {
    }
    public static Singleton1 getInstance() {
        if (singleton == null) {
            singleton = new Singleton1();
        }
        return singleton;
    }
}
